﻿<controls:ChildWindow x:Class="WorkSpace.UI.Windows.LinkWindow"
           xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
           xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
           xmlns:controls="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls"
           Width="600"
           Title="添加应用连接">
    <Grid x:Name="LayoutRoot" Margin="2">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>
        <Grid Grid.Row="0">
            <Grid.RowDefinitions>
                <RowDefinition Height="auto"/>
                <RowDefinition Height="auto"/>
                <RowDefinition Height="auto"/>
                <RowDefinition Height="auto"/>
                <RowDefinition Height="auto"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="75"/>
                <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <TextBlock Text="类别" Grid.Row="0" Grid.Column="0" VerticalAlignment="Center"/>
            <TextBox Name="_ctlEditCategory" Grid.Row="0" Grid.Column="1" IsReadOnly="True"/>
            <TextBlock Text="名称" Grid.Row="1" Grid.Column="0" VerticalAlignment="Center"/>
            <TextBox Name="_ctlEditCaption" Grid.Row="1" Grid.Column="1" Text="{Binding Path=Caption,Mode=TwoWay}"/>

            <TextBlock Text="地址" Grid.Row="2" Grid.Column="0" VerticalAlignment="Center"/>
            <TextBox Name="_ctlEditLinkUrl" Grid.Row="2" Grid.Column="1" Text="{Binding Path=LinkUrl,Mode=TwoWay}"/>

            <TextBlock Text="通知地址" Grid.Row="3" Grid.Column="0" VerticalAlignment="Center"/>
            <TextBox Name="_ctlEditNoticeUrl" Grid.Row="3" Grid.Column="1" Text="{Binding Path=NoticeUrl,Mode=TwoWay}"/>

            <TextBlock Text="图标地址" Grid.Row="4" Grid.Column="0" VerticalAlignment="Center"/>
            <Grid Grid.Row="4" Grid.Column="1">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="auto"/>
                    <ColumnDefinition Width="*"/>
                    <ColumnDefinition Width="auto"/>
                </Grid.ColumnDefinitions>
                <Image Name="_ctlIcon" Width="48" Height="48"/>
                <TextBox Name="_ctlEditIconUrl" Grid.Column="1" VerticalAlignment="Bottom" Text="{Binding Path=IconUrl,Mode=TwoWay}" IsReadOnly="True"/>
                <Button Name="_ctlBtnUpload" Content="上传图标" Grid.Column="2" Click="_ctlBtnUpload_Click" VerticalAlignment="Bottom"/>
            </Grid>
        </Grid>

        <StackPanel Grid.Row="1" Orientation="Horizontal" HorizontalAlignment="Center">
            <Button x:Name="OKButton" Content="确定" Click="OKButton_Click"/>
            <Button x:Name="CancelButton" Content="取消" Click="CancelButton_Click"/>
        </StackPanel>
    </Grid>
</controls:ChildWindow>